home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 86
/
086.d81
/
states seminar
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
7KB
|
237 lines
2 poke52,128:poke56,128:clr:a$=""
3 dv=peek(186):ifdv<8thendv=8
4 poke53280,0:poke53281,0:print"[147]":gosub60000:rem goto7
5 sys57812"ss.font",8,0:poke780,0:poke781,0:poke782,128:sys65493
6 sys57812"input any.o",dv,0:poke780,0:poke781,60:poke782,3:sys65493
7 a$="":print"[147]":poke56578,peek(56578)or3:poke56576,(peek(56576)and252)or1
8 poke53272,33:poke648,136:print"[147]"
9 dv=peek(186):ifdv<8thendv=8
10 dimi,j,k,mc,gh$,a$,bd$,t$,mt,nd,g,kk,e,cc,df,bx,by,ex,bd,rv,bc,yr$,pl,yw,x
11 dimln%,z$(51),dp(151),qu$(151,2),an(151),zz(51),yy(51),cc$(3),s$(3),df$(3)
12 mc=54272
18 gh$=" "
20 ba$="[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
22 a$="[221][157][221][157][221][157][221][157][221][157][221][157][221][157]":fori=1to6:bd$=bd$+a$:next
25 poke53280,0:poke53281,0
26 cc$(0)=" [213]nited [211]tates ":s$(0)="us"
28 cc$(1)=" [212]he [199]reat [215]hite [206]orth ":s$(1)="ca"
30 cc$(2)=" [196]ownunder ":s$(2)="do"
35 df$(0)=" [197]asy [209]uestions "
36 df$(1)=" [196]ifficult [209]uestions "
37 df$(2)=" [193] [204]ittle of [194]oth "
38 t$="[147][159] [211] [212] [193] [212] [197] [211] [211] [197] [205] [201] [206] [193] [210]"
50 gosub150:gosub380:gosub500:mt=15:nd=0:g=0
52 goto3520
54 :
60 fori=1toss(cc)+1:zz(i)=0:next
62 kk=int(rnd(0)*9)+1
64 fori=1to9
66 ifi=kkthenyy(i)=an(e):goto74
68 k=int(rnd(0)*ss(cc))+1
70 if(zz(k)=1)or(k=an(e))then68
72 yy(i)=k:zz(k)=1
74 next:return
75 :
150 poke53280,6:poke53281,7:print"[147]"
160 bx=1:by=1:ex=39:bd=21:rv=1:bc=0:gosub6760
170 poke214,2:print:printtab(4)" [211][212][193][212][197][211][160][211][197][205][201][206][193][210] will test your"
180 printtab(4)"knowledge of the states of the
185 [153][163]4)"(NULL)nion, atnustralia and lenanada.
190 printtab(4)"[215]henever you are asked a question
200 [153][163]4)"you will be presented with 9"
210 [153][163]4)"possible answers. (NULL)ress the"
220 [153][163]4)"number of the alternative you"
230 [153][163]4)"think is correct. valach game"
240 [153][163]4)"consists of 15 questions.
250 printtab(4)"[144][215][193][199][197][210][201][206][199]: [212]his program allows you"
260 printtab(4)"to wager on your answers. [217]ou"
270 printtab(4)"can't wager more than what's in"
280 printtab(4)"your banrkroll. [217]ou are given"
290 printtab(4)"$15 when the game begins. [212]he"
300 printtab(4)"game will end early if your"
310 printtab(4)"bankroll falls to $0. [197]nter "chr$(34)"a"chr$(34)
320 printtab(4)"to bet your whole bankroll."
340 poke214,21:print:printtab(13)"[156][208][210][197][211][211][160][193][206][217][160][203][197][217]"
350 poke198,0
360 geta$:ifa$=""then360
370 return
378 :
380 poke53280,0:poke53281,0:printt$"":fori=0to2:printtab(8)"[154]"cc$(i):print:next
382 cc=0:poke214,10:print:print" [156][213]se [195][210][211][210] [213][208][156]/[196][207][215][206][156] and [210][197][212][213][210][206]"
384 poke214,3+(2*cc):print:printtab(8)""cc$(cc)"[145]"
386 poke198,0
388 geta$:ifa$<>"[145]"anda$<>""anda$<>chr$(13)then388
390 ifa$=chr$(13)then399
392 printtab(8)"[154]"cc$(cc)
394 ifa$="[145]"thencc=cc-1:ifcc<0thencc=2
396 ifa$=""thencc=cc+1:ifcc>2thencc=0
398 goto384
399 poke781,11:sys59903:poke214,13:print
400 fori=0to2:printtab(8)"[154]"df$(i):print:next
402 df=0:poke214,20:print:print" [156][213]se [195][210][211][210] [213][208][156]/[196][207][215][206][156] and [210][197][212][213][210][206]"
404 poke214,13+(2*df):print:printtab(8)""df$(df)"[145]"
406 poke198,0
408 geta$:ifa$<>"[145]"anda$<>""anda$<>chr$(13)then408
410 ifa$<>chr$(13)then412
411 poke781,21:sys59903:poke214,20:print:printtab(15)"[158][204]oading...":return
412 printtab(8)"[154]"df$(df)
414 ifa$="[145]"thendf=df-1:ifdf<0thendf=2
416 ifa$=""thendf=df+1:ifdf>2thendf=0
418 goto404
419 :
500 i=0:open8,dv,8,s$(cc):get#8,a$,a$
510 i=i+1:sys828,8,30:ifa$="*"thenss(cc)=i-1:goto530
515 z$(i)=a$:goto510
530 i=0
540 i=i+1
541 sys828,8,40:ifst<>0then550
542 qu$(i,0)=a$:sys828,8,40:qu$(i,1)=a$
545 sys828,8,5:an(i)=val(a$):ifst=0then540
550 close8:cp(cc)=i/2
560 return
3520 gosub5480
3530 i=rnd(-ti):poke53280,2
3540 ifdf=0thene=int(rnd(1)*cp(cc))+1
3545 ifdf=1thene=int(rnd(1)*cp(cc)+cp(cc))+1
3547 ifdf=2thene=int(rnd(1)*2*cp(cc))+1
3550 ifdp(e)then3540
3560 dp(e)=1
3630 poke214,3:print:printgh$
3640 print"[145]"gh$
3645 fori=0to24:poke217+i,peek(217+i)or128:next
3650 poke214,3:print:print" "qu$(e,0):print" "qu$(e,1)
3670 gosub5700:gosub6110
3672 poke214,13:print"[144]":gosub60
3673 fori=1to9:printtab(5)""z$(yy(i)):next
3680 poke214,7:print:print"[217]our answer?"
3690 bx=13:by=7:ex=16:bd=1:rv=0:bc=4:gosub6760
3700 poke198,0
3710 getyr$:ifyr$=""then3710
3730 ifyr$<"1"oryr$>"9"thengoto3680
3740 poke214,7:print:printtab(14)"[144]";yr$
3750 ifval(yr$)<>kkthen3770
3760 gosub6180:pl=0:mt=mt+yw:gosub6050:gosub6370:gosub5900:goto3920
3770 gosub6140:gosub6020:pl=0:mt=mt-yw:gosub5900
3920 poke214,12+kk:print:printtab(5)"[154]";z$(an(e))
3930 forx=1to2500:next
3940 nd=nd+1
3950 if(nd=15)or(mt=0)then6390
3990 goto3520
5480 poke53280,2
5490 print"[147]":poke53280,2:poke53281,1
5500 poke214,0:print:print"[145][159] [211][212][193][212][197][211] [160][211][197][205][201][206][193][210] ";
5510 print"[144][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
5520 printtab(14)"[144][209][213][197][211][212][201][207][206] #";nd+1
5530 poke214,9:print:print"[144][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]";
5540 gosub5900
5550 poke214,11:print:printtab(5)"[129][193]nswer [195]hoices"
5560 poke214,13:print:forx=1to9:printtab(2)"[144] ":nextx
5570 bx=1:by=13:ex=22:bd=9:rv=1:bc=7
5580 gosub6760
5590 poke214,13:print"[144]"
5600 fori=1to9
5610 printtab(2)""right$(str$(i),1)"."
5620 next
5630 return
5700 gosub6220:poke214,12:print
5710 printtab(25)"[129][217]our[157][157][157][157]bet? [144]$";
5720 yw$="":poke198,0
5730 ln%=len(str$(mt))-1:gosub50000:yw$=q9$
5870 ifyw$="a"thenyw=mt:goto5880
5875 yw=val(yw$)
5880 gosub5960
5890 return
5900 gosub6250:poke214,17:print:printtab(24)"[217]our [194]ankroll"
5910 poke214,19:print:forx=1to3:printtab(25)"[156] ":nextx
5920 ifpl=1thenreturn
5930 ifsn=0thenpoke214,20:print:printtab(27)"[156]$";mt
5940 pl=0
5950 return
5960 if(yw<=mt)and(mt>0)thenreturn
5965 ifyw=0thenpoke214,13:print:printtab(31)"[144]0":return
5970 poke214,12:print:printtab(25)" ":printtab(25)" ":goto5700
6020 pokemc+0,0:pokemc+1,10:pokemc+4,33:pokemc+5,15:pokemc+6,15:pokemc+24,11
6030 fory=1to200:next:pokemc+4,32:fory=1to100:next:pokemc+24,0
6040 return
6050 pokemc,0:pokemc+5,15:pokemc+6,15:pokemc+1,0:ki=30:pokemc+24,15
6060 forx=1to12:pokevc+33,1
6070 pokemc+1,ki:pokemc+4,17:forz=1to40:next:pokemc+4,16:ki=ki+4:next
6080 pokemc+24,0
6090 poke53281,1
6100 return
6110 pokemc+24,7:pokemc+23,0:pokemc+6,0:pokemc+5,12:pokemc+1,200
6120 pokemc+3,40:pokemc+4,0:pokemc+4,65
6130 formm=1to500:next:pokemc+4,0:return
6140 poke214,6:print:forx=1to3:printtab(21)"[144] ":next
6150 poke214,0:print:print"[145][145][144] [211][212][193][212][197][211] [211][197][205][201][206][193][210] ";
6160 poke214,7:print:printtab(23)"[144][201][206][195][207][210][210][197][195][212]":poke53280,11
6170 return
6180 poke214,6:print:forx=1to3:printtab(21)" ":next
6190 poke214,7:print:printtab(25)"[210][201][199][200][212]!":poke53280,14
6200 poke214,0:print:print"[145][145] [211][212][193][212][197][211] [211][197][205][201][206][193][210] ";
6210 return
6220 bx=23:by=11:ex=39:bd=4:bc=5:rv=1
6230 gosub6760
6240 return
6250 bx=23:by=17:ex=39:bd=5:bc=6:rv=1
6260 gosub6760
6270 return
6280 poke214,12:prin